package com.crscd.ai.config;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 10/10/25 4:50 PM
 * @modifiedBy:
 * @version: 1.0
 */
@Configuration
public class SaaLLMConfig {
  @Bean
  public ChatClient chatClient(ChatModel chatModel, ToolCallbackProvider tools) {
    return ChatClient.builder(chatModel).defaultToolCallbacks(tools.getToolCallbacks()).build();
  }
}
